clear t,y;
t=0:0.01:100;
y=sin(2*pi*t);
plot(t,y);
figure(2);
mydft(y,100,0);axis([0.9 1.1 0 1]);
%%
clear w;
w=zeros(size(t));
w(4750:5249)=hamming(500);
yf=w.*y;
figure(3);
plot(t,yf);
figure(4);
mydft(yf,100,0);axis([0.9 1.1 0 0.028]);